-
Notifications
You must be signed in to change notification settings - Fork 0
/
Year 63 - Defrag Disordered
70 lines (69 loc) · 991 Bytes
/
Year 63 - Defrag Disordered
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
-- 7 Billion Humans (2145) --
-- 63: Defrag Disordered by @n05ucc4u and @commonnickname --
step n
jump a
mem1 = foreachdir nw:
mem2 = foreachdir n:
mem3 = foreachdir w:
a:
if mem1 == nothing and
mem2 == datacube and
mem3 == nothing:
step ne
pickup n
step n
step n
step n
step ne
drop
mem1 = nearest datacube
step s
step s
pickup s
step mem1
else:
if mem1 == hole and
mem3 == hole:
pickup ne
step n
step n
step n
step n
step n
drop
step se
pickup s
drop
step e
pickup se
else:
if mem3 == worker:
step ne
step ne
pickup s
step n
step ne
drop
step sw
pickup sw
step n
step n
else:
pickup ne
step ne
step ne
step n
step n
step n
drop
step sw
pickup s
step n
endif
endif
endif
endfor
endfor
endfor
step n
drop